<template>
  <div>
    <div class="box">
      <div class="tab" v-for="(item, index) in '选项卡动画'" :key="index">
        {{ item }}
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "LittleApeFrameworkDemo",

  data() {
    return {};
  },

  mounted() {},

  methods: {},
};
</script>

<style lang="scss" scoped>
.box {
  width: 100%;
  height: 60px;
  background: #31acff;
  display: flex;
  align-items: center;
  justify-content: space-evenly;

  .tab {
    position: relative;
    padding: 0 10px;
    width: fit-content;
    height: 100%;
    display: flex;
    align-items: center;
    transition: color 0.3s;
  }

  .tab::before {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 5px;
    width: 0;
    height: 4px;
    border-radius: 2px;
    background: #ffffff;
    transition: all 0.3s;
  }

  .tab:hover {
    color: #ffffff;
  }
  .tab:hover::before {
    left: 0;
    width: 100%;
  }
}
</style>
